package com.scy.java.object.dt;
//圆形
public class Circle extends GeometricObject{
    //半径
    private double radius;
    //全参构造器
    public Circle(String color, double weight, double radius) {
        super(color, weight);
        this.radius = radius;
    }
    //计算圆形面积的方法


    @Override
    public double findArea() {
        return 3.14*radius*radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }
}
